package com.baidu.health.service;

import com.baidu.health.pojo.resVo.resFaqListVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baidu.health.pojo.TbConsult;
import com.baidu.health.mapper.TbConsultMapper;
import com.netflix.ribbon.proxy.annotation.Var;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class TbConsultServiceImpl extends ServiceImpl<TbConsultMapper, TbConsult>{

    @Autowired
    TbConsultMapper consultMapper;

    public resFaqListVo getConsultList(Integer pageNum, Integer pageSize) {
        List<TbConsult> list = consultMapper.getConsultList(pageNum,pageSize);
        Integer nums = this.getConsultListNums();
        return new resFaqListVo(200,"查询成功",list,nums);
    }
    public Integer getConsultListNums(){
        int size = consultMapper.selectList(null).size();
        return size;
    }
}




